import axios from 'axios';

const instance = axios.create({
    baseURL:'https://loran.vip',
    timeout:5000,
    headers:{'Content-Type': 'application/x-www-form-urlencoded' }
});

// get请求
class Ajax {
    get(url,params){
        return instance.get(url,{...params});
    }
    post(url,params){
        return instance.post(url,{...params});
    }
}

const ajax = new Ajax();

export default ajax;